package com.voja.mrvica2.remoteimage;

import java.util.concurrent.Callable;

import android.graphics.Bitmap;
import android.view.View;

public class OnRemoteImageLoadded implements Callable<Void> {

    RemoteImageView view;
    Bitmap          bitmap;
    
    public OnRemoteImageLoadded(RemoteImageView view) {
        this.view = view;
    }
    
    @Override
    public Void call() throws Exception {
        view.getThrobberView().setVisibility(View.GONE);
        view.getImageView().setVisibility(View.VISIBLE);
        
        if (bitmap != null) {
            view.bitmap = bitmap;
        }
        return null;
    }

}
